<?php if(!empty($subvo)){
    $v = $subvo;
    $subvo = '';
}
if(!empty($subsubvo)){
    $v = $subsubvo;
    $subsubvo = '';
}
?>

<div class="viewBox myBox<?php echo $v['id'];?>"<?php if($_SESSION[C('USER_AUTH_KEY')]){?> sortID="<?php echo $v['sort'];?>" modulesID="<?php echo $v['id'];?>" title="<?php echo $v['title'];?>" editUrl="<?php echo U('/Admin/Window/edit',array('modules_id' => $v['id'], 'siteid' => __SITEID__, 'tablename'=>'News','fieldlist' => 'title,content','map'=>'id,'.$id));?>" deleteUrl="<?php echo U('/Admin/Modules/delete',array('id'=>$v['id']));?>" settingUrl="<?php echo U('/Admin/Modules/edit',array('id'=>$v['id']));?>" isEdit="1"<?php }?>>
  <?php if(!empty($v['dataname'])){
                $v['content'] = $v['dataname'];
                
        }
         ?> 
  <div class="panel panel-primary">
    <?php include(TMPL_PATH.'Home/TemplateDefault/Public-Moduletitle'.C('TMPL_TEMPLATE_SUFFIX')); ?>
    <div class="panel-body">
      
      <h1 style="font-size:20px; border-bottom:1px solid #eee; line-height:1.75em;"><?php echo $title;?></h1>
      <p style="font-size:16px; font-family:Arial;"><?php echo date('Y-m-d',$datetime); ?>&nbsp;&nbsp;&nbsp;<a style="font-size:16px;" href="__APP__/"><?php echo getSysVal('sitename');?></a></p>
      
      <br>

      <?php foreach($imgList as $v){?>
      <p>
      <img src="<?php echo getThumbPath($v['img_url']);?>" alt="<?php echo $v['title'];?>">
      </p>
      
      <?php } ?>
      
      <?php echo $v['content'];?>
      
       
      
      <p style="font-size:16px; padding:12px 0; color:#666;">阅读 <span id="NewsReadBox"><?php echo $click;?></span>&nbsp;&nbsp;<a id="ZanBtn"><i class="fa fa-thumbs-o-up"></i>赞(<span id="NewsZanBox"><?php echo $zan;?></span>)</a></p>
     

    </div>
  </div><?php if(strtolower(GROUP_NAME) != 'admin'){?>
  <script>
      $.post('<?php echo U('/Home/Ajax/getNensZanAndClick');?>', {'id':<?php echo $id;?>}, function(data){
		 $('#NewsReadBox').html(data.click);
		 $('#NewsZanBox').html(data.zan);
	  }, 'json');
	  $('#ZanBtn').click(function(e) {
        $.post('<?php echo U('/Home/Ajax/NewsZan');?>', {'id':<?php echo $id;?>}, function(data){
			if(data.status == 1){
				$('#NewsZanBox').html(data.data);
			}else{
				error(data.info);
			}
			
		}, 'json');
    });
  </script>
  
  <?php }?>
</div>
